home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / lib / partman / check.d / 07basic_method_only < prev    next >
Encoding:
Text File  |  2009-04-19  |  832 b   |  34 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. for dev in $DEVICES/*; do
  6.     [ -d "$dev" ] || continue
  7.     cd $dev
  8.     partitions=
  9.     open_dialog PARTITIONS
  10.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  11.         [ "$fs" != free ] || continue
  12.         partitions="$partitions $id,$num"
  13.     done
  14.     close_dialog
  15.  
  16.     for part in $partitions; do
  17.         id=${part%,*}
  18.         num=${part#*,}
  19.         [ -f $id/method ] || continue
  20.         method=$(cat $id/method)
  21.         [ "$method" = format -o "$method" = keep ] || continue
  22.         [ ! -f $id/acting_filesystem ] || continue
  23.         db_subst partman-basicmethods/method_only PARTITION "$num"
  24.         db_subst partman-basicmethods/method_only DEVICE $(humandev $(cat device))
  25.         db_input critical partman-basicmethods/method_only || true
  26.         db_go || exit 1
  27.         db_get partman-basicmethods/method_only
  28.         if [ "$RET" = true ]; then
  29.             exit 1
  30.         fi
  31.     done
  32.  
  33. done
  34.